package org.cs.publics.model;
// Generated 2018-12-28 17:39:08 by Hibernate Tools 5.2.3.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 商品信息表
 */

/**
 * GoodsInfo generated by hbm2java
 */
@Entity
@Table(name = "goods_info", catalog = "good_fresh")
public class GoodsInfo implements java.io.Serializable {

	/**
	 * 商品信息ID
	 */
	private Integer goodsInfoId;
	/**
	 * 商品类型编号
	 */
	private Admin admin;
	/**
	 * 商品类型编号
	 */
	private GoodsType goodsType;
	private Integer goodsInfoState;
	private String goodsInfoName;
	private String goodsInfoIntro;
	private String goodsInfoDetails;
	private Integer goodsInfoRecstate;
	private String goodsInfoImage;
	private Long goodsInfoPrice;
	private Long goodsInfoVipPrice;
	private Date createTime;
	private Date updateTime;
	private String goodsHoldOne;
	private String goodsHoldTwo;
	private Set<GroupInfo> groupInfos = new HashSet<GroupInfo>(0);
	private Set<GoodsExplain> goodsExplains = new HashSet<GoodsExplain>(0);
	private Set<Like> likes = new HashSet<Like>(0);
	private Set<PickGoods> pickGoodses = new HashSet<PickGoods>(0);
	private Set<GoodsImage> goodsImages = new HashSet<GoodsImage>(0);

	public GoodsInfo() {
	}

	public GoodsInfo(Admin admin, GoodsType goodsType, Integer goodsInfoState, String goodsInfoName,
			String goodsInfoIntro, String goodsInfoDetails, Integer goodsInfoRecstate, String goodsInfoImage,
			Long goodsInfoPrice, Long goodsInfoVipPrice, Date createTime, Date updateTime, String goodsHoldOne,
			String goodsHoldTwo, Set<GroupInfo> groupInfos, Set<GoodsExplain> goodsExplains, Set<Like> likes,
			Set<PickGoods> pickGoodses, Set<GoodsImage> goodsImages) {
		this.admin = admin;
		this.goodsType = goodsType;
		this.goodsInfoState = goodsInfoState;
		this.goodsInfoName = goodsInfoName;
		this.goodsInfoIntro = goodsInfoIntro;
		this.goodsInfoDetails = goodsInfoDetails;
		this.goodsInfoRecstate = goodsInfoRecstate;
		this.goodsInfoImage = goodsInfoImage;
		this.goodsInfoPrice = goodsInfoPrice;
		this.goodsInfoVipPrice = goodsInfoVipPrice;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.goodsHoldOne = goodsHoldOne;
		this.goodsHoldTwo = goodsHoldTwo;
		this.groupInfos = groupInfos;
		this.goodsExplains = goodsExplains;
		this.likes = likes;
		this.pickGoodses = pickGoodses;
		this.goodsImages = goodsImages;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "GOODS_INFO_ID", unique = true, nullable = false)
	public Integer getGoodsInfoId() {
		return this.goodsInfoId;
	}

	public void setGoodsInfoId(Integer goodsInfoId) {
		this.goodsInfoId = goodsInfoId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ADMIN_ID")
	public Admin getAdmin() {
		return this.admin;
	}

	public void setAdmin(Admin admin) {
		this.admin = admin;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GOODS_TYPE_ID")
	public GoodsType getGoodsType() {
		return this.goodsType;
	}

	public void setGoodsType(GoodsType goodsType) {
		this.goodsType = goodsType;
	}

	@Column(name = "GOODS_INFO_STATE")
	public Integer getGoodsInfoState() {
		return this.goodsInfoState;
	}

	public void setGoodsInfoState(Integer goodsInfoState) {
		this.goodsInfoState = goodsInfoState;
	}

	@Column(name = "GOODS_INFO_NAME", length = 10)
	public String getGoodsInfoName() {
		return this.goodsInfoName;
	}

	public void setGoodsInfoName(String goodsInfoName) {
		this.goodsInfoName = goodsInfoName;
	}

	@Column(name = "GOODS_INFO_INTRO", length = 100)
	public String getGoodsInfoIntro() {
		return this.goodsInfoIntro;
	}

	public void setGoodsInfoIntro(String goodsInfoIntro) {
		this.goodsInfoIntro = goodsInfoIntro;
	}

	@Column(name = "GOODS_INFO_DETAILS", length = 1000)
	public String getGoodsInfoDetails() {
		return this.goodsInfoDetails;
	}

	public void setGoodsInfoDetails(String goodsInfoDetails) {
		this.goodsInfoDetails = goodsInfoDetails;
	}

	@Column(name = "GOODS_INFO_RECSTATE")
	public Integer getGoodsInfoRecstate() {
		return this.goodsInfoRecstate;
	}

	public void setGoodsInfoRecstate(Integer goodsInfoRecstate) {
		this.goodsInfoRecstate = goodsInfoRecstate;
	}

	@Column(name = "GOODS_INFO_IMAGE", length = 30)
	public String getGoodsInfoImage() {
		return this.goodsInfoImage;
	}

	public void setGoodsInfoImage(String goodsInfoImage) {
		this.goodsInfoImage = goodsInfoImage;
	}

	@Column(name = "GOODS_INFO_PRICE", precision = 10, scale = 0)
	public Long getGoodsInfoPrice() {
		return this.goodsInfoPrice;
	}

	public void setGoodsInfoPrice(Long goodsInfoPrice) {
		this.goodsInfoPrice = goodsInfoPrice;
	}

	@Column(name = "GOODS_INFO_VIP_PRICE", precision = 10, scale = 0)
	public Long getGoodsInfoVipPrice() {
		return this.goodsInfoVipPrice;
	}

	public void setGoodsInfoVipPrice(Long goodsInfoVipPrice) {
		this.goodsInfoVipPrice = goodsInfoVipPrice;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPDATE_TIME", length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "GOODS_HOLD_ONE", length = 25)
	public String getGoodsHoldOne() {
		return this.goodsHoldOne;
	}

	public void setGoodsHoldOne(String goodsHoldOne) {
		this.goodsHoldOne = goodsHoldOne;
	}

	@Column(name = "GOODS_HOLD_TWO", length = 25)
	public String getGoodsHoldTwo() {
		return this.goodsHoldTwo;
	}

	public void setGoodsHoldTwo(String goodsHoldTwo) {
		this.goodsHoldTwo = goodsHoldTwo;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "goodsInfo")
	public Set<GroupInfo> getGroupInfos() {
		return this.groupInfos;
	}

	public void setGroupInfos(Set<GroupInfo> groupInfos) {
		this.groupInfos = groupInfos;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "goodsInfo")
	public Set<GoodsExplain> getGoodsExplains() {
		return this.goodsExplains;
	}

	public void setGoodsExplains(Set<GoodsExplain> goodsExplains) {
		this.goodsExplains = goodsExplains;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "goodsInfo")
	public Set<Like> getLikes() {
		return this.likes;
	}

	public void setLikes(Set<Like> likes) {
		this.likes = likes;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "goodsInfo")
	public Set<PickGoods> getPickGoodses() {
		return this.pickGoodses;
	}

	public void setPickGoodses(Set<PickGoods> pickGoodses) {
		this.pickGoodses = pickGoodses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "goodsInfo")
	public Set<GoodsImage> getGoodsImages() {
		return this.goodsImages;
	}

	public void setGoodsImages(Set<GoodsImage> goodsImages) {
		this.goodsImages = goodsImages;
	}

}
